from flask import Blueprint

# 公共工具函数
def register_blueprints(app):
    """集中注册所有蓝图"""
    from .auth import bp as auth_bp
    from .user import bp as user_bp
    from .student import bp as student_bp
    from .content import bp as content_bp
    from .task import bp as task_bp
    from .review_plan import bp as review_plan_bp
    from .study_record import bp as study_record_bp
    from .plan_config import bp as plan_config_bp
    from .study import bp as study_bp

    app.register_blueprint(study_bp, url_prefix='/api/study')
    app.register_blueprint(auth_bp,url_prefix='/api/auth')
    app.register_blueprint(user_bp, url_prefix='/api/user')
    app.register_blueprint(student_bp, url_prefix='/api/students')
    app.register_blueprint(content_bp, url_prefix='/api/contents')
    app.register_blueprint(task_bp, url_prefix='/api/tasks')
    app.register_blueprint(review_plan_bp, url_prefix='/api/review-plans')
    app.register_blueprint(study_record_bp, url_prefix='/api/study-records')
    app.register_blueprint(plan_config_bp, url_prefix='/api/plan-configs')